package net.loyintean.pearlshell.validation.rule;

import net.loyintean.pearlshell.validation.IValidRule;
import net.loyintean.pearlshell.validation.IValidRuleConfig;

class StringNotBlankValidRuleImpl extends AbstractStringValidRuleImpl implements
		IValidRule {

	StringNotBlankValidRuleImpl() {
		super();
	}

	@Override
	protected boolean validString(String toValid, IValidRuleConfig config) {

		return toValid.trim().length() != 0;

	}

	@Override
	public String errorMsg(IValidRuleConfig config) {
		return "不能为空字符串";
	}

}
